Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking: move CPU/CPU_MODEL to Makefile.features #11477

Closed

Conversation

cladmi
Copy link
Contributor

@cladmi cladmi commented May 2, 2019

Contribution description

This pull request is a tracking pull request for moving the definition of CPU and CPU_MODEL to the board Makefile.features.

Moving these definitions is required to be parse Makefile.dep before `Makefile.include.

It is part of #9913

This pull request is going to be split

Questions:

CPU_MODEL

Currently the only place left where CPU_MODEL is not defined in board/.../Makefile.features is makefiles/arch/cortexm.inc.mk.

Would it make sense to define with this value by default globally in RIOT if not defined ? I could define it now in Makefile.features.
It would remove the need to define them for cpu fe310, esp*, lpc1768 (the only one using the value of cortexm.inc.mk.

Another solution is to define it in cpu/cortexm_common/Makefile.features but it would be the only one defined in cpu.

Testing procedure

First compiling everything in the CI should still work. The number of jobs should stay the same.

I will also provide a way to verify that the FEATURES_PROVIDED do not change.

I am currently running https://gist.github.com/cladmi/893e63740f935cbfe4087db19a8c17af

./compare_riot_repositories_variable_value_sorted.sh ~/work/git/worktree/riot_master/ ~/work/git/RIOT FEATURES_PROVIDED
...

Issues with:

tests/riotboot_hdr
/bin/sh: 1: arithmetic expression: expecting primary: " + "
/bin/sh: 1: arithmetic expression: expecting primary: " + "
/bin/sh: 1: arithmetic expression: expecting primary: " + "
/bin/sh: 1: arithmetic expression: expecting primary: " + "

For tests/riotboot_hdr, the output always contains this even on master for some boards.

BOARD=hifive1 make --no-print-directory -C tests/riotboot_hdr/ info-debug-variable-FEATURES_PROVIDED
/bin/sh: 1: arithmetic expression: expecting primary: " + "
/bin/sh: 1: arithmetic expression: expecting primary: " + "
periph_gpio periph_gpio_irq periph_rtc periph_rtt periph_timer periph_uart periph_cpuid periph_pm

Issues/PRs references

Tracking issue #9913 on dependency handling order.

@cladmi cladmi added State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: boards Area: Board ports Type: tracking The issue tracks and organizes the sub-tasks of a larger effort labels May 2, 2019
@cladmi cladmi added this to the Release 2019.07 milestone May 2, 2019
@cladmi cladmi added the State: waiting for other PR State: The PR requires another PR to be merged first label May 3, 2019
@cladmi cladmi removed the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 3, 2019
@cladmi cladmi force-pushed the pr/make/boards/cpu_cpu_model_to_features branch from a37f063 to 399e02a Compare June 3, 2019 09:12
@cladmi cladmi force-pushed the pr/make/boards/cpu_cpu_model_to_features branch from 399e02a to f2d9013 Compare June 11, 2019 12:59
@cladmi cladmi force-pushed the pr/make/boards/cpu_cpu_model_to_features branch from f2d9013 to 860dcfa Compare June 14, 2019 17:59
@cladmi cladmi force-pushed the pr/make/boards/cpu_cpu_model_to_features branch 2 times, most recently from 5746968 to 2bd0746 Compare July 1, 2019 16:13
@cladmi cladmi force-pushed the pr/make/boards/cpu_cpu_model_to_features branch from 2bd0746 to 06b57d0 Compare July 4, 2019 12:03
@cladmi cladmi force-pushed the pr/make/boards/cpu_cpu_model_to_features branch 2 times, most recently from 8d3c34e to 789257b Compare August 14, 2019 10:20
@cladmi cladmi force-pushed the pr/make/boards/cpu_cpu_model_to_features branch from e94b04c to ad7221a Compare September 25, 2019 11:16
@cladmi cladmi force-pushed the pr/make/boards/cpu_cpu_model_to_features branch 2 times, most recently from 169bcf6 to 58317f4 Compare September 30, 2019 10:21
@cladmi cladmi force-pushed the pr/make/boards/cpu_cpu_model_to_features branch 3 times, most recently from 0248785 to 829261c Compare September 30, 2019 12:16
@cladmi cladmi force-pushed the pr/make/boards/cpu_cpu_model_to_features branch from 829261c to 9de1545 Compare September 30, 2019 12:48
@cladmi cladmi force-pushed the pr/make/boards/cpu_cpu_model_to_features branch 2 times, most recently from 08d2fae to cf2bee8 Compare October 2, 2019 11:50
@cladmi cladmi force-pushed the pr/make/boards/cpu_cpu_model_to_features branch from cf2bee8 to 4d2884f Compare October 9, 2019 09:41
@kb2ma kb2ma modified the milestones: Release 2019.10, Release 2020.01 Oct 9, 2019
@kb2ma kb2ma modified the milestones: Release 2020.01, Release 2019.10 Oct 9, 2019
@kb2ma
Copy link
Member

kb2ma commented Oct 9, 2019

Reset milestone to 2019.10. We anticipate that the imminent merge of #12410 allows this PR also to be merged.

…ures

CPU must now be defined by `$(RIOTBOARD)/$(BOARD)/Makefile.features` or
one of its common included Makefile.features file.
The cpu `Makefile.dep` file can now automatically be included when it exists.
@cladmi cladmi force-pushed the pr/make/boards/cpu_cpu_model_to_features branch from 4d2884f to eff80f7 Compare October 10, 2019 08:40
@cladmi
Copy link
Contributor Author

cladmi commented Oct 10, 2019

Migration is now finished! Thank you for everybody who helped.

Last commit remaining in this branch is the one forbidding the old behavior.
I will move this one to a different PR that will be deprecating this behavior but would be for after the release.

Currently checking that CPU is defined is enforced in RIOT by the dist/tools/build_system_static_check/check.sh script but not in the build system to keep external boards working.

@cladmi
Copy link
Contributor Author

cladmi commented Oct 10, 2019

The PR enforcing the new behavior is in #12417

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: build system Area: Build system State: waiting for other PR State: The PR requires another PR to be merged first State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet Type: tracking The issue tracks and organizes the sub-tasks of a larger effort
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants